package com.iscas.tech.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iscas.tech.entity.AtBaseuser;
import com.iscas.tech.param.AtBaseuserPageParam;
import com.iscas.tech.vo.AtBaseuserQueryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 前端用户注册表 Mapper 接口
 *
 * @author yangyi
 * @since 2020-10-26
 */
@Repository
public interface AtBaseuserMapper extends BaseMapper<AtBaseuser> {


    /**
     * 获取分页对象
     *
     * @param page
     * @param atBaseuserPageParam
     * @return
     */
    IPage<AtBaseuserQueryVo> getAtBaseuserPageList(@Param("page") Page page, @Param("param") AtBaseuserPageParam atBaseuserPageParam);

    /**
     * @param id 用户ID
     * @return 审核用户
     */
    Boolean checkUser(@Param("id") Long id);

    /**
     * @param keyword 关键字
     * @return 满足条件的所有用户信息
     */
    List<AtBaseuserQueryVo> searchUser(@Param("keyword") String keyword);
}
